import matplotlib.pyplot as plt

x_values = list(range(1, 1001))
y_values = [x ** 2 for x in x_values]
plt.scatter(x_values, y_values, s=10, edgecolors="none", c=(0.6, 0.8, 1))
plt.scatter(x_values, y_values, s=10, edgecolors="none", c=y_values, cmap=plt.cm.Blues)

plt.title("scatter square", fontsize=10)
plt.xlabel("value", fontsize=10)
plt.ylabel("square value", fontsize=10)

plt.tick_params(which="major", labelsize=10)
# 设置每个坐标轴的取值范围
# plt.axis([0,1100,0,1100000])

# 显示图片
plt.show()

# 保存图片
# plt.savefig("square_plot.png", bbox_inches='tight')
